#include "ScreenManager.h"
#include "..\soil\SOIL.h"


ScreenManager::ScreenManager(void)
{
	// Load start screen texture
	m_startScreenTextureMap = SOIL_load_OGL_texture("ArtAssets\\MainScreen2.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID,
		SOIL_FLAG_NTSC_SAFE_RGB);

	glDisable(GL_LIGHTING);
}

void ScreenManager::DrawStartScreen()
{
	glDisable(GL_LIGHTING);

	glEnable(GL_TEXTURE_2D);
	glBindTexture(GL_TEXTURE_2D, m_startScreenTextureMap);

	//glFrontFace(GL_CCW);

	glColor4ub(0xFF, 0xFF, 0xFF, 0xFF);

	// Draw texture
	glLoadIdentity();

	glBegin(GL_QUADS);

	glTexCoord2f(0, 0);
	glVertex3f(-32, -24, 0);

	glTexCoord2f(0, 1);
	glVertex3f(-32, 24, 0);

	glTexCoord2f(1, 1);
	glVertex3f(32, 24, 0);

	glTexCoord2f(1, 0);
	glVertex3f(32, -24, 0);

	glEnd();
}

void ScreenManager::Unload()
{
	glDisable(GL_TEXTURE_2D);
	glEnable(GL_LIGHTING);
}


ScreenManager::~ScreenManager(void)
{
}
